export function useRouteParamsWith(name: string) {
  const route = useRoute();
  const val = ref(route.params[name]),
    routeName = route.name;
  watch(
    () => route.params[name],
    (v) => {
      if (v && routeName == route.name) val.value = v;
    },
  );
  onActivated(() => {
    if (route.params[name] && routeName == route.name)
      val.value = route.params[name];
  });
  return val;
}
